package com.matrix.java.chap_06.exercise;

public class EX6_13 {
    /*    public static void main(String[] args) {
            int max =0;
            max(1,2,max);
            System.out.println(max);
        }

        private static void max(int value1, int value2, int max) {
            if (value1>value2){
                max=value1;
            }else {
                max=value2;
            }
        }*/
/*    public static void main(String[] args) {
        int i = 1;
        while (i <= 6) {
            method(i, 2);
            i++;
        }
    }

    private static void method(int i, int num) {
        for (int j = 1; j <= i; j++) {
            System.out.println(num + " ");
            num *= 2;
        }
        System.out.println();
    }*/
/*    public static void main(String[] args) {
        int times =3;
        System.out.println("Before the call, variable times is "+times);
        nPrintln("Welcome to Java!",times);
        System.out.println("After the call, variable times is "+times);
    }

    private static void nPrintln(String message, int n) {
        while (n>0){
            System.out.println("n = "+n);
            System.out.println(message);
            n--;
        }
    }*/
    public static void main(String[] args) {
        int i = 0;
        while (i <= 4) {
            method(i);
            i++;
        }
        System.out.println("i is " + i);
    }

    private static void method(int i) {
        do {
            if (i % 3 != 0) {
                System.out.println(i + " ");
            }
            i--;
        } while (i >= 1);
        System.out.println();
    }
}
